function fn(a, b) {
	console.log("a", a);
	console.log("b", b);
	console.log("this", this);
	return "hello";
}

Function.prototype.myCall = function (obj) {
    // 获取参数
    let args = [...arguments]
    // 获取this
    let self = this
    // 得到后面的参数
    args.shift()
    
    obj.fn = self
    let res = obj.fn(...args)
    delete obj.fn
    return res
}
// const res = fn.call({ x: 10 }, 20, 30)
const res = fn.myCall({ x: 10 }, 20, 30);
console.log('res',res);